{% extends "master.html" %}
{% block subtitle %} - 基础信息 - 商品属性管理 - {{label}}{% endblock %}


{% block main %}
<div class="container">
    <div class="row">
        <ol class="breadcrumb">
          <li><a href="{{url_for('bpMas.view')}}">基础信息</a></li>
          <li><a href="{{url_for('bpMas.view',action='pdtattr')}}">商品属性管理</a></li>
          <li class="active">{{label}}</li>
        </ol>
    </div>
    
    <div class="row">     
        <div class="panel panel-primary">
            <div class="panel-heading"><h4 class="panel-title">输入查询条件</h4></div>
            <div class="panel-body">
                <div class="row">{{mymacros.render_search_form(form,3)}}</div>
                <div class="row">
                    <div class="col-md-12"> 
                        <div class="btn-toolbar pull-right">
                            <div class="btn-group"><button type="button" class="btn btn-default" onclick="$('form').submit()">查询</button></div>
                            <div class="btn-group"><a href="{{url_for('bpMas.view',action='add',t=t)}}" class="btn btn-primary">创建{{label}}</a></div>
                        </div>
                    </div>
                </div>
            </div>
        
            <table class="table table-bordered">
                <thead>
                    <tr>
                        <td class="col-md-2">系统编号</td>
                        <td class="col-md-2">{{label}}名称</td>
                        {% if t =='PT' %}
                        <td class="col-md-2">商品编号前缀</td>
                        {% endif %}
                        <td>备注</td>
                        <td class="col-md-2">创建人</td>
                        <td class="col-md-2">创建时间</td>
                    </tr>
                </thead>
                <tbody>
                    {% for r,u in result.items %}
                        <tr>
                            {% if getAllPermission(['MASTER_EDIT',])%}
                            <td><a href="{{url_for('bpMas.view',action='update',id=r.id,t=t)}}">{{r.no}}</a></td>
                            {% else %}
                                <td>{{r.no}}</td>
                            {% endif %}
                            <td>{{r.name}}</td>
                            {% if t =='PT' %}
                            <td>{{r.prefixCode}}</td>
                            {% endif %}
                            <td>{{r.remark|f}}</td>
                            <td>{{u|f}}</td>
                            <td>{{r.createTime|ft}}</td>
                        </tr>
                    {% endfor %}
                <tbody>
            </table>
            {{mymacros.mypaginate(result)}}
        </div>
    </div>
</div>
{% endblock %}